import { IsString, IsOptional, IsBoolean, IsNotEmpty } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

export class CreateFileDto {
  @ApiPropertyOptional({ description: '文件描述' })
  @IsOptional()
  @IsString({ message: '文件描述必须是字符串' })
  description?: string;

  @ApiPropertyOptional({ description: '文件标签' })
  @IsOptional()
  @IsString({ message: '文件标签必须是字符串' })
  tags?: string;

  @ApiPropertyOptional({ description: '是否公开访问', default: false })
  @IsOptional()
  @IsBoolean({ message: '是否公开访问必须是布尔值' })
  isPublic?: boolean;
}
